package pe.com.libreriasancristobal.bean;

// Generated 17/06/2012 05:25:28 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Detalleoperacion generated by hbm2java
 */
@Entity
@Table(name = "detalleoperacion", catalog = "bdsancristobal")
public class Detalleoperacion implements java.io.Serializable {

	private DetalleoperacionId id;
	private Proveedor proveedor;
	private Tipogasto tipogasto;
	private Tipodocumento tipodocumento;
	private Tipoventa tipoventa;
	private Cliente cliente;
	private Operacion operacion;
	private Centrocosto centrocosto;
	private Formapago formapago;
	private Date fecOpe;
	private Double totOpe;
	private String numDoc;
	private String obsOpe;
	private String numOrd;
	private String codLib;
	private Double totLis;
	private Double totVen;
	private Double totDes;
	private Double porDes;
	private String flgOpe;

	public Detalleoperacion() {
	}

	public Detalleoperacion(Operacion operacion, String flgOpe) {
		this.operacion = operacion;
		this.flgOpe = flgOpe;
	}

	public Detalleoperacion(Proveedor proveedor, Tipogasto tipogasto,
			Tipodocumento tipodocumento, Tipoventa tipoventa, Cliente cliente,
			Operacion operacion, Centrocosto centrocosto, Formapago formapago,
			Date fecOpe, Double totOpe, String numDoc, String obsOpe,
			String numOrd, String codLib, Double totLis, Double totVen,
			Double totDes, Double porDes, String flgOpe) {
		this.proveedor = proveedor;
		this.tipogasto = tipogasto;
		this.tipodocumento = tipodocumento;
		this.tipoventa = tipoventa;
		this.cliente = cliente;
		this.operacion = operacion;
		this.centrocosto = centrocosto;
		this.formapago = formapago;
		this.fecOpe = fecOpe;
		this.totOpe = totOpe;
		this.numDoc = numDoc;
		this.obsOpe = obsOpe;
		this.numOrd = numOrd;
		this.codLib = codLib;
		this.totLis = totLis;
		this.totVen = totVen;
		this.totDes = totDes;
		this.porDes = porDes;
		this.flgOpe = flgOpe;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "idOperacion", column = @Column(name = "idOperacion", nullable = false)),
			@AttributeOverride(name = "codVen", column = @Column(name = "codVen", nullable = false, length = 5)) })
	public DetalleoperacionId getId() {
		return this.id;
	}

	public void setId(DetalleoperacionId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "numDocIdePrv")
	public Proveedor getProveedor() {
		return this.proveedor;
	}

	public void setProveedor(Proveedor proveedor) {
		this.proveedor = proveedor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "codTipGas")
	public Tipogasto getTipogasto() {
		return this.tipogasto;
	}

	public void setTipogasto(Tipogasto tipogasto) {
		this.tipogasto = tipogasto;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "codTipDoc")
	public Tipodocumento getTipodocumento() {
		return this.tipodocumento;
	}

	public void setTipodocumento(Tipodocumento tipodocumento) {
		this.tipodocumento = tipodocumento;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "codTipVen")
	public Tipoventa getTipoventa() {
		return this.tipoventa;
	}

	public void setTipoventa(Tipoventa tipoventa) {
		this.tipoventa = tipoventa;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "numDocIdeCli")
	public Cliente getCliente() {
		return this.cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Operacion getOperacion() {
		return this.operacion;
	}

	public void setOperacion(Operacion operacion) {
		this.operacion = operacion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "codCenCos")
	public Centrocosto getCentrocosto() {
		return this.centrocosto;
	}

	public void setCentrocosto(Centrocosto centrocosto) {
		this.centrocosto = centrocosto;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "codForPag")
	public Formapago getFormapago() {
		return this.formapago;
	}

	public void setFormapago(Formapago formapago) {
		this.formapago = formapago;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "fecOpe", length = 19)
	public Date getFecOpe() {
		return this.fecOpe;
	}

	public void setFecOpe(Date fecOpe) {
		this.fecOpe = fecOpe;
	}

	@Column(name = "totOpe", precision = 22, scale = 0)
	public Double getTotOpe() {
		return this.totOpe;
	}

	public void setTotOpe(Double totOpe) {
		this.totOpe = totOpe;
	}

	@Column(name = "numDoc", length = 15)
	public String getNumDoc() {
		return this.numDoc;
	}

	public void setNumDoc(String numDoc) {
		this.numDoc = numDoc;
	}

	@Column(name = "obsOpe", length = 150)
	public String getObsOpe() {
		return this.obsOpe;
	}

	public void setObsOpe(String obsOpe) {
		this.obsOpe = obsOpe;
	}

	@Column(name = "numOrd", length = 15)
	public String getNumOrd() {
		return this.numOrd;
	}

	public void setNumOrd(String numOrd) {
		this.numOrd = numOrd;
	}

	@Column(name = "codLib", length = 15)
	public String getCodLib() {
		return this.codLib;
	}

	public void setCodLib(String codLib) {
		this.codLib = codLib;
	}

	@Column(name = "totLis", precision = 22, scale = 0)
	public Double getTotLis() {
		return this.totLis;
	}

	public void setTotLis(Double totLis) {
		this.totLis = totLis;
	}

	@Column(name = "totVen", precision = 22, scale = 0)
	public Double getTotVen() {
		return this.totVen;
	}

	public void setTotVen(Double totVen) {
		this.totVen = totVen;
	}

	@Column(name = "totDes", precision = 22, scale = 0)
	public Double getTotDes() {
		return this.totDes;
	}

	public void setTotDes(Double totDes) {
		this.totDes = totDes;
	}

	@Column(name = "porDes", precision = 22, scale = 0)
	public Double getPorDes() {
		return this.porDes;
	}

	public void setPorDes(Double porDes) {
		this.porDes = porDes;
	}

	@Column(name = "flgOpe", nullable = false, length = 1)
	public String getFlgOpe() {
		return this.flgOpe;
	}

	public void setFlgOpe(String flgOpe) {
		this.flgOpe = flgOpe;
	}

}
